set(SOURCE_DIR ${PROJECT_ROOT}/driver/i2c)
set(HEADER_DIR ${PROJECT_ROOT}/include/driver)

qelib_include_directories(${HEADER_DIR})

qelib_sources(
    ${SOURCE_DIR}/i2c.c)

set(INSTALL_HEADERS
    ${HEADER_DIR}/qe_i2c.h)

# Xilinx AXI GPIO
qelib_sources_ifdef(CONFIG_AXI_I2C ${SOURCE_DIR}/axi_i2c.c)

# Xilinx AXI GPIO v2
qelib_sources_ifdef(CONFIG_AXI_I2C_V2 ${SOURCE_DIR}/axi_i2c_v2.c)

install(FILES ${INSTALL_HEADERS} DESTINATION ${QELIB_INSTALL_PATH}/include/driver)